package org.dinner.order.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

import org.hibernate.validator.constraints.NotEmpty;

@Entity
@NamedQueries({
	@NamedQuery(name = "DishType.list", query = "from DishType") //TODO implement paging mechanism
})
@Table(name = "DISH_TYPES")
public class DishType {
	@Id
	@GeneratedValue
	private int id;
	
	@Column(nullable = false, unique = true)
	@NotEmpty
	private String typeName;
	
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getTypeName() {
		return typeName;
	}
	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	
}
